-
Notifications
You must be signed in to change notification settings - Fork 0
KAFKA-17897: Deprecate Admin.listConsumerGroups [2/N] #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
Conversation
@FrankYang0529 That's an interesting point. I'll put in a change to |
Warning Rate limit exceeded@arvi18 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 13 minutes and 47 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (9)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
/refacto-test |
Refacto is reviewing this PR. Please wait for the review comments to be posted. |
@@ -3524,44 +3524,62 @@ void handleResponse(AbstractResponse abstractResponse) { | |||
for (final Node node : allNodes) { | |||
final long nowList = time.milliseconds(); | |||
runnable.call(new Call("listGroups", deadline, new ConstantNodeIdProvider(node.id())) { | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Backward Compatibility Risk: The fallback mechanism in listGroups
for handling UnsupportedVersionException
is only enabled when regularConsumerGroupTypes
is true. This could lead to inconsistent behavior when working with older broker versions depending on the options used.
Consider expanding the fallback mechanism to work with all group type filters or clearly document this limitation.
groupState = Optional.empty(); | ||
} else { | ||
groupState = Optional.of(GroupState.parse(group.groupState())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Complexity: The handleResponse
method has become quite complex with nested conditionals and multiple responsibilities (parsing response, handling errors, filtering groups, etc).
Consider extracting the filtering logic into a separate method to improve readability and maintainability.
groupState = Optional.empty(); | ||
} else { | ||
groupState = Optional.of(GroupState.parse(group.groupState())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Performance Consideration: The maybeAddGroup
method performs filtering of protocol types in the client rather than at the broker level, which could be less efficient when dealing with large numbers of groups.
Consider investigating if this filtering can be pushed to the server side for better efficiency with large result sets.
/refacto-test |
1 similar comment
/refacto-test |
🤖 Refacto.AI: PR Summary & Reviewer GuideWarning: Requirements context (e.g., linked ticket) was not provided. Analysis is based solely on PR metadata and code diff, which may be incomplete. 🎯 1. The Goal (Why was this PR raised?)This PR aims to deprecate the 🗺️ 2. The Changes (What was implemented?)
🤔 3. Key Areas for Human ReviewArea of Concern: Backward Compatibility Logic
Area of Concern: Protocol Type Filtering
Area of Concern: Factory Method Correctness
Area of Concern: Command Line Tool Updates
|
Refacto is reviewing this PR. Please wait for the review comments to be posted. |
/refacto-test |
🤖 Refacto.AI: PR Summary & Reviewer GuideWarning: Requirements context (e.g., linked ticket) was not provided. Analysis is based solely on PR metadata and code diff, which may be incomplete. 🎯 1. The Goal (Why was this PR raised?)This PR aims to deprecate 🗺️ 2. The Changes (What was implemented?)
🤔 3. Key Areas for Human ReviewArea of Concern: Backward Compatibility Logic
Area of Concern: Factory Method Behavior
Area of Concern: Protocol Type Filtering
Area of Concern: Tool Compatibility
|
Refacto is reviewing this PR. Please wait for the review comments to be posted. |
/refacto-test |
🤖 Refacto.AI: PR Summary & Reviewer GuideWarning: Requirements context (e.g., linked ticket) was not provided. Analysis is based solely on PR metadata and code diff, which may be incomplete. 🎯 1. The Goal (Why was this PR raised?)This PR aims to deprecate the 🗺️ 2. The Changes (What was implemented?)
🤔 3. Key Areas for Human ReviewArea of Concern: Backward Compatibility in KafkaAdminClient
Area of Concern: Factory Methods in ListGroupsOptions
Area of Concern: Protocol Type Filtering
Area of Concern: CLI Tool Updates
|
Refacto is reviewing this PR. Please wait for the review comments to be posted. |
/refacto-test |
🤖 Refacto.AI: PR Summary & Reviewer GuideWarning: Requirements context (e.g., linked ticket) was not provided. Analysis is based solely on PR metadata and code diff, which may be incomplete. 🎯 1. The Goal (Why was this PR raised?)This PR aims to deprecate the 🗺️ 2. The Changes (What was implemented?)
🤔 3. Key Areas for Human ReviewArea of Concern: Backward Compatibility with Older Brokers
Area of Concern: Protocol Type Filtering
Area of Concern: Factory Methods Correctness
Area of Concern: Deprecation Impact
|
Admin.listConsumerGroups() was able to use the early versions of
ListGroups RPC with the version used dependent upon the filters the user
specified. Admin.listGroups(ListGroupsOptions.forConsumerGroups())
inadvertently required ListGroups v5 because it always set a types
filter. This patch handles the UnsupportedVersionException and winds
back the complexity of the request unless the user has specified filters
which demand a higher version.
It also adds ListGroupsOptions.forShareGroups() and forStreamsGroups().
The usability of Admin.listGroups() is much improved as a result.